<template>
	<view class="home">
		<view class="banner">
			<image src="http://klwl-file.oss-cn-shenzhen.aliyuncs.com/202105/jhstest/49642875526530.png"
				mode="widthFix"></image>
			<view class="banner-title">
				<image class="av-img" src="./static/logo.png"></image>
				<view class="tit">
					<text class="pb-20">{{vuex_adminuser.name}}</text>
					<text>{{vuex_adminuser.phone}}</text>
				</view>
			</view>
			<view class="setting" @click="open">
				<u-icon name="setting" color="#fff" size="40"></u-icon>
			</view>
		</view>





		<view class="nav">
			<view class="nav-item" v-for="(item, index) in navList" :key="index" @click="openItem(item.url, index)">
				<view class="img">
					<view class="iconfont u-font-46" :class="item.icon"></view>
				</view>
				<view class="">{{ item.name }}</view>
			</view>
			<view class="nav-item" v-for="(item, index) in navList.length % 4 == 0 ? 0 : 4 - (navList.length % 4)"
				:key="index">
				<view class="img" style="background-color: #fff;">
					<u-icon name="" size="30"></u-icon>
				</view>

			</view>
		</view>
		<sww-login />
	</view>
</template>

<script>
	import {
		adminPost
	} from '@/common/http.request.js';
	import {
		mapState
	} from 'vuex';
	import {
		wxScanCode
	} from '@/utils/uniPromise.js';
	import queryParams from "@/utils/queryParams";
	export default {

		data() {
			return {
				analysis: {},
				isLogin: false,
				navList: [{
						icon: 'iconfont-e646',
						name: '活动列表',
						url: '/package/enroll/activity/index'
					},
					{
						icon: 'iconfont-e715',
						name: '报名管理',
						url: '/package/enroll/userList/index'
					},
					{
						icon: 'iconfont-e637',
						name: '批量评分',
						url: '/package/enroll/batchScoring/index'
					},
				]
			};
		},

		onLoad() {

		
		},
		onShow() {


		},
		methods: {
			openItem(url, index) {
				this.$to(url)
			},
			open(){
				this.$linkTo('/package/enroll/setting/index')
			}
		}
	};
</script>
<style>
	page {
		background-color: #f5f5f5;
	}
</style>
<style lang="scss" scoped>
	.home {
		padding: 20rpx 0;

		.pb-20 {
			padding-bottom: 20rpx;
		}

		.mr-20 {
			margin-right: 20rpx;
		}

		.mb-4 {
			margin-bottom: 4rpx;
		}

		.banner {
			position: relative;
			margin: 0 30rpx 20rpx;

			.setting {
				position: absolute;
				right: 30rpx;
				top: 20rpx;
			}

			.banner-title {
				display: flex;
				position: absolute;
				left: 78rpx;
				top: 34rpx;
				align-items: center;

				.av-img {
					width: 110rpx;
					height: 110rpx;
					border-radius: 50%;
					overflow: hidden;
				}

				.tit {
					display: flex;
					flex-direction: column;
					margin-left: 20rpx;
					color: #fff;
				}
			}
		}

		.transaction {
			width: 696rpx;
			margin: 0 auto 20rpx;
			background-color: #fff;
			padding: 30rpx;
			position: relative;
			border-radius: 20rpx;

			.transaction-title {
				font-size: 34rpx;
				font-weight: bold;
				color: #333;
			}

			.echart {
				text-align: center;
				position: relative;
				padding-top: 46rpx;
				display: flex;
				justify-content: center;
				align-items: center;

				.progress_box {
					position: relative;

					.xian_box {
						position: absolute;
						top: 44rpx;
						left: 44rpx;
						right: 44rpx;
						height: 50%;
						background-size: 100%;
						background-repeat: no-repeat;
					}

					.echart-title {
						display: flex;
						flex-direction: column;
						align-items: center;
						position: absolute;
						top: 100rpx;
						left: 50%;
						transform: translateX(-50%);
					}
				}
			}

			.num_box {
				display: flex;
				flex-direction: column;
				align-items: center;
				position: absolute;
				bottom: 60rpx;

				&.num-left {
					left: 60rpx;
				}

				&.num-right {
					right: 60rpx;
				}
			}
		}

		.nav {
			width: 696rpx;
			margin: 0 auto;
			background-color: #fff;
			padding: 36rpx 25rpx;
			display: flex;
			border-radius: 20rpx;
			flex-wrap: wrap;
			justify-content: space-between;

			.nav-item {
				display: flex;
				// flex: 1;
				width: 25%;
				margin-bottom: 20rpx;
				flex-direction: column;
				align-items: center;

				.img {
					height: 80rpx;
					width: 80rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					border-radius: 50%;
					background-color: #f2f9ff;
					margin-bottom: 20rpx;
					color: #3297ef;
				}
			}
		}
	}
</style>
